#pragma once
#include <memory>
#include <string>
#include "TCPCilent.h"
#include "Timer.h"
#include "MsgHandler.h"
#include "types.h"
class CMsgRequester
{
public:
	CMsgRequester(uv_loop_t* loop);
	~CMsgRequester();
	void StartSendDevMsg(std::string ip,uint16_t port);
	void StartSendFileCheckMsg(std::string ip, uint16_t port);
	void SetModuleID(uint32_t moduleid);
	void SetDestMoudleID(uint32_t moduleid);
	void StopSvr();
private:
	CTimer m_timer;
	CTCPClientPtr m_clientPtr;
	CTCPClientPtr m_devPtr;
	CMsgHandlerPtr m_msgHlrPtr;	
	CMsgHandlerPtr m_devMsgHlrPtr;
	uint64_t m_moduleID;
	uint64_t m_destModuleID;
};
typedef std::shared_ptr<CMsgRequester> CMsgRequsterPtr;